﻿<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="basePath" value="${pageContext.request.contextPath}" scope="application" />
<!DOCTYPE html>
<html>
<head>
<title>执行sql-订正库表</title>
<script src="${basePath}/static/js/jquery-2.1.4.min.js"></script>
<script src="${basePath}/static/js/bootstrap.min.js"></script>
<script src="${basePath}/static/js/jquery-confirm.min.js" charset="UTF-8"></script>
<link href="${basePath}/static/css/bootstrap.min.css" rel="stylesheet" />
<link href="${basePath}/static/css/jquery-confirm.min.css" rel="stylesheet" />
<style type="text/css">
.vertical-center {
	position: absolute;
	top: 30%;
	left: 50%;
	transform: translate(-50%, -50%);
}
</style>
<script name="name" type="text/javascript" src="${basePath}/static/js/image-file-visible.js"></script>
<script name="name" type="text/javascript" src="${basePath}/static/js/jquery.form.js"></script>
<script name="name" type="text/javascript">
	$(function(){
		$.imageFileVisible({
			wrapSelector: "#pic",
			fileSelector: "#pictureFile",
			formSelector: "#fileForm",
			url: "${basePath}/file/upload",
			width: 100,
			height: 50
		});
	});
	
	function clp(){
		return $("#pictureFile").click();
	}
	
</script>
</head>
<body>
<form id="fileForm" name="fileForm" method="post" action="${basePath}/file/upload" enctype="multipart/form-data" class="form-horizontal" role="form">
	<div class="container">
		<div class="col-md-4 column vertical-center">
			<div class="col-md-12 column vertical-center">
				<div style="margin-top:30px;" class="row clearfix">
					<div class="col-md-10 column">
						<h4 class="text-warning">文件上传测试</h4>
					</div>
				</div>
				<div style="margin-top:10px;" class="form-group col-md-8 column" >
					<label>模块</label><br>
					<select id="category" name="category" style="width:100%;height:30px;">
						<option>miss</option>
						<option>news</option>
						<option>school</option>
						<option>group</option>
					</select>
				</div>
				<div class="form-group col-md-8 column">
					<label>类型</label><br>
					<select id="type" name="type" style="width:100%;height:30px;">
						<option value="0">图片</option>
						<option value="1">视频</option>
					</select>
				</div>
				<div class="form-group col-md-8 column">
					<label>摘要</label><br>
					<input type="text" name="digest" style="width:100%;height:30px;"/>
				</div>
				<%-- <div class="form-group col-md-8 column">
					<div class="col-sm-10">
						<img id="pic" name="pic" onclick = "clp();" style="margin-top:10px;Cursor:pointer;width: 350px;height:300px;" src="${basePath}/static/image/null.jpg">
						<input id="pictureFile" name="pictureFile" style="visibility: hidden;" type="file" class="form-control" />
						<input id="picture" name="picture" type="hidden" class="form-control" />
					</div>
				</div> --%>
				<div class="form-group col-md-8 column">
					<div class="col-sm-10">
						<input name="pictureFile" type="file" class="form-control" />
					</div>
				</div>
				<div class="form-group col-md-8 column">
					<div class="col-sm-10">
						<button type="submit">点击提交</button>
					</div>
				</div>
			</div>
			</form>
		</div>
	</div>
	</form>
</body>
</html>